         <div class="easyui-layout" data-options="fit:true">
				<table id="cusMonthEverydayKeyIndex_datagrid" style="width:100%;height:100%;" class="easyui-datagrid">
					<thead frozen="true">
						<tr>
							<th data-options="field:'cusname',width:60,align:'center',hidden:true">姓名</th>
							<th data-options="field:'organname',width:80,align:'center',hidden:true">机构</th>
							<th data-options="field:'servicedate',width:80,align:'center'">时间</th>
						</tr>
					</thead>
					<thead>
						<tr>	
						<th data-options="field:'tostorenum',width:80,align:'center'" >到店次数</th>
							<th data-options="field:'tostoreratio',width:160,align:'center'" >到店次数比率21次合格率</th>
							<th data-options="field:'lastdayweight',width:80,align:'center'" >最后一天体重</th>
							<th data-options="field:'nodelweight',width:80,align:'center'" >未减斤数</th>
							<th data-options="field:'totaldelweight',width:80,align:'center'">累计减重斤数</th>
							<th data-options="field:'totaldelratio',width:80,align:'center'">累计减重率</th>
							<th data-options="field:'monthtarget',width:80,align:'center'">当月目标</th>
							<th data-options="field:'monthdelweight',width:80,align:'center'">当月实减斤数</th>
							<th data-options="field:'monthtargetratio',width:80,align:'center'">当月目标达成率</th>
							<th data-options="field:'isdb',width:80,align:'center'">是否达标</th>
							<%
								for(var i=1;i<32;i++){
							%>
								 <th data-options="field:'${i !}',width:60,align:'center'" >${i !}</th>
							<%	}
							%>
							
						</tr>
						
					</thead>
				</table>
				<div id="monthEverydayKeyIndex_tb" >
					日期：
					<input id="monthEverydayKeyIndex_startTime" value='${startTime !}' class="easyui-datebox theme-textbox-radius"  data-options="editable: false"/>~
					<input id="monthEverydayKeyIndex_endTime" value='${date(),dateFormat="yyyy-MM"}' class="easyui-datebox theme-textbox-radius" data-options="editable: false"/>
				</div>
	    	</div>  
			<script type="text/javascript">
			$(document).ready(function () {
				//加载数据表格
				loadMonthEverydayKeyIndex();
				dateFormatter($('#monthEverydayKeyIndex_startTime'));
				dateFormatter($('#monthEverydayKeyIndex_endTime'));
				
			});
			function  loadMonthEverydayKeyIndex()
			{	
				var startTime = $("#monthEverydayKeyIndex_startTime").val();
				var endTime = $("#monthEverydayKeyIndex_endTime").val();
				$('#cusMonthEverydayKeyIndex_datagrid').datagrid({
					singleSelect: true,
					toolbar: '#monthEverydayKeyIndex_tb',
					rownumbers: true, //显示序号
					url: "${cxt!}/customerInfoStatistic/LookCustomerMonthEverydayKeyIndex",
					queryParams: {
						'customerIds': '${customerIds! }',
						'startTime': startTime,
						'endTime': endTime
					},
					method: 'post'
				})
			}
			function  dateFormatter($datebox)
			{
				$datebox.datebox({
					       //显示日趋选择对象后再触发弹出月份层的事件，初始化时没有生成月份层
					       onShowPanel: function () {
					          //触发click事件弹出月份层
					          span.trigger('click'); 
					          if (!tds)
					            //延时触发获取月份对象，因为上面的事件触发和对象生成有时间间隔
					            setTimeout(function() { 
					                tds = p.find('div.calendar-menu-month-inner td');
					                tds.click(function(e) {
					                   //禁止冒泡执行easyui给月份绑定的事件
					                   e.stopPropagation(); 
					                   //得到年份
					                   var year = /\d{4}/.exec(span.html())[0] ,
					                   //月份
					                   //之前是这样的month = parseInt($(this).attr('abbr'), 10) + 1; 
					                   month = parseInt($(this).attr('abbr'), 10);  
	
								         //隐藏日期对象                     
								         $datebox.datebox('hidePanel').datebox('setValue', year + '-' + month); 
								         loadMonthEverydayKeyIndex();
					                 });
					             }, 0);
					        },
				            //配置parser，返回选择的日期
				            parser: function (s) {
				                if (!s) return new Date();
				                var arr = s.split('-');
				                return new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, 1);
				            },
				            //配置formatter，只返回年月 之前是这样的d.getFullYear() + '-' +(d.getMonth()); 
				            formatter: function (d) { 
				                var currentMonth = (d.getMonth()+1);
				                var currentMonthStr = currentMonth < 10 ? ('0' + currentMonth) : (currentMonth + '');
				                return d.getFullYear() + '-' + currentMonthStr; 
				            }
				       });

				        //日期选择对象
				        var p = $datebox.datebox('panel'), 
				        //日期选择对象中月份
				        tds = false, 
				        //显示月份层的触发控件
				        span = p.find('span.calendar-text'); 
// 				        var curr_time = new Date();
				        //设置前当月
// 				        $datebox.datebox("setValue", myformatter(curr_time));
			}
			//格式化日期
			function myformatter(date) {
			    //获取年份
			    var y = date.getFullYear();
			    //获取月份
			    var m = date.getMonth() + 1;
			    return y + '-' + m;
			}

			</script>
			
